package oop2.src.enumDemo;

public class Test {
    public static void main(String[] args) {
        //枚举通过枚举类调用
        fun(Season.SPRING);
    }
    public static void fun(Season o){
        //switch函数对枚举提供了便利,不用写枚举类名
        switch(o){
            case SPRING:
                System.out.println("spring");break;
            case SUMMER:
                System.out.println("summer");break;
            case AUTUMN:
                System.out.println("autumn");break;
            case WINTER:
                System.out.println("winter");
        }
    }
}
